<?php
abstract class Wow_Armory_Core_Handler_Abstract
{
    
    protected $_results = array();
    
    const CHARACTER   = 'character';
    const STATISTIC   = 'statistic';
    const ACHIEVEMENT = 'achievement';
    const REPUTATION  = 'reputation';
    const TALENT      = 'talent';
    const GUILD       = 'guild';
    
    public function parse()
    {
        throw new Wow_Armory_Exception('', 1018);
    }
    
    public function __set($key, $value)
    {
        $this->_results[$key] = $value;
    }
    
    public function __get($key)
    {
        if (isset($this->_results[$key])) {
            return $this->_results[$key];
        }
        
        return null;
    }
    
    protected function _toResults(Array $results)
    {
        foreach ($results as $name => $item) {
            $this->_results[$name] = $item;
        }
    }
    
}